home *** CD-ROM | disk | FTP | other *** search
/ Chip 2007 January, February, March & April / Chip-Cover-CD-2007-02.iso / Pakiet bezpieczenstwa / mini Pentoo LiveCD 2006.1 / mpentoo-2006.1.iso / livecd.squashfs / usr / lib / mozilla-firefox / include / xpinstall / nsIXPIDialogService.h < prev    next >
C/C++ Source or Header  |  2006-05-08  |  7KB  |  163 lines

  1. /*
  2.  * DO NOT EDIT.  THIS FILE IS GENERATED FROM nsIXPIDialogService.idl
  3.  */
  4.  
  5. #ifndef __gen_nsIXPIDialogService_h__
  6. #define __gen_nsIXPIDialogService_h__
  7.  
  8.  
  9. #ifndef __gen_nsISupports_h__
  10. #include "nsISupports.h"
  11. #endif
  12.  
  13. /* For IDL files that don't want to include root IDL files. */
  14. #ifndef NS_NO_VTABLE
  15. #define NS_NO_VTABLE
  16. #endif
  17. class nsIDOMWindow; /* forward declaration */
  18.  
  19. class nsIXPIProgressDialog; /* forward declaration */
  20.  
  21. class nsIObserver; /* forward declaration */
  22.  
  23.  
  24. /* starting interface:    nsIXPIDialogService */
  25. #define NS_IXPIDIALOGSERVICE_IID_STR "8cdd8baa-1dd2-11b2-909a-f0178da5c5ff"
  26.  
  27. #define NS_IXPIDIALOGSERVICE_IID \
  28.   {0x8cdd8baa, 0x1dd2, 0x11b2, \
  29.     { 0x90, 0x9a, 0xf0, 0x17, 0x8d, 0xa5, 0xc5, 0xff }}
  30.  
  31. /**
  32.  * A service provided by embedding applications to override
  33.  * the default XUL implmementation of XPInstall dialogs.
  34.  *
  35.  * Embedding applications which wish to override the default
  36.  * XUL dialogs need to create a component which implements
  37.  * this interface and registers with the Contract ID
  38.  * "@mozilla.org/embedui/xpinstall-dialog-service;1"
  39.  *
  40.  * @status UNDER_REVIEW
  41.  */
  42. class NS_NO_VTABLE nsIXPIDialogService : public nsISupports {
  43.  public: 
  44.  
  45.   NS_DEFINE_STATIC_IID_ACCESSOR(NS_IXPIDIALOGSERVICE_IID)
  46.  
  47.   /**
  48.      * @brief  Ask the user if it's OK to install
  49.      *
  50.      * When called the XPIDialogService implementation should pose an
  51.      * install confirmation dialog and return the user's response
  52.      *
  53.      * @param parent        a window that can be used to parent the modal dialog
  54.      *
  55.      * @param packageList   For each install package there will be three strings,
  56.      *                      a display name, a source URL, and a the name of the
  57.      *                      organization that signed this install.  Note that the
  58.      *                      name of the signer is not verified.  Verification
  59.      *                      happens when the the install has completely downloaded.
  60.      *                      Your user interface should only suggest that the 
  61.      *                      install may be signed by this organization name.
  62.      *                      Note that an unsigned archive is indicated by an 
  63.      *                      empty string.   
  64.      *
  65.      * @param count         The number of strings in the packageList. This
  66.      *                      will always be three times the number of 
  67.      *                      packages.
  68.      *
  69.      * @return true to install, false to cancel
  70.      */
  71.   /* boolean confirmInstall (in nsIDOMWindow parent, [array, size_is (count)] in wstring packageList, in unsigned long count); */
  72.   NS_IMETHOD ConfirmInstall(nsIDOMWindow *parent, const PRUnichar **packageList, PRUint32 count, PRBool *_retval) = 0;
  73.  
  74.   /**
  75.      * @brief Create and open a download-and-install progress dialog
  76.      *
  77.      * When called the XPIDialogService implementation creates and opens
  78.      * a dialog to display the status of the install. When the dialog
  79.      * is ready to be used then the observer must be called: the subject
  80.      * is an nsIXPIProgressDialog that nsXPInstallManager can use to control
  81.      * the dialog, the topic is "xpinstall-progress"  and the data is "open".
  82.      *
  83.      * If the user wishes to cancel the download, the dialog can call the
  84.      * observe method with the same subject and topic and the data "cancel".
  85.      *
  86.      * @note Unless this routine throws an exception the observer <b>must</b>
  87.      * be called or nsXPInstallManager will wait forever and never clean
  88.      * itself up.
  89.      *
  90.      * @param packageList   three strings per package as in confirmInstall()
  91.      * @param count         the number of strings in the list
  92.      * @param observer      nsIObserver to receive messages from the dialog
  93.      */
  94.   /* void openProgressDialog ([array, size_is (count)] in wstring packageList, in unsigned long count, in nsIObserver observer); */
  95.   NS_IMETHOD OpenProgressDialog(const PRUnichar **packageList, PRUint32 count, nsIObserver *observer) = 0;
  96.  
  97. };
  98.  
  99. /* Use this macro when declaring classes that implement this interface. */
  100. #define NS_DECL_NSIXPIDIALOGSERVICE \
  101.   NS_IMETHOD ConfirmInstall(nsIDOMWindow *parent, const PRUnichar **packageList, PRUint32 count, PRBool *_retval); \
  102.   NS_IMETHOD OpenProgressDialog(const PRUnichar **packageList, PRUint32 count, nsIObserver *observer); 
  103.  
  104. /* Use this macro to declare functions that forward the behavior of this interface to another object. */
  105. #define NS_FORWARD_NSIXPIDIALOGSERVICE(_to) \
  106.   NS_IMETHOD ConfirmInstall(nsIDOMWindow *parent, const PRUnichar **packageList, PRUint32 count, PRBool *_retval) { return _to ConfirmInstall(parent, packageList, count, _retval); } \
  107.   NS_IMETHOD OpenProgressDialog(const PRUnichar **packageList, PRUint32 count, nsIObserver *observer) { return _to OpenProgressDialog(packageList, count, observer); } 
  108.  
  109. /* Use this macro to declare functions that forward the behavior of this interface to another object in a safe way. */
  110. #define NS_FORWARD_SAFE_NSIXPIDIALOGSERVICE(_to) \
  111.   NS_IMETHOD ConfirmInstall(nsIDOMWindow *parent, const PRUnichar **packageList, PRUint32 count, PRBool *_retval) { return !_to ? NS_ERROR_NULL_POINTER : _to->ConfirmInstall(parent, packageList, count, _retval); } \
  112.   NS_IMETHOD OpenProgressDialog(const PRUnichar **packageList, PRUint32 count, nsIObserver *observer) { return !_to ? NS_ERROR_NULL_POINTER : _to->OpenProgressDialog(packageList, count, observer); } 
  113.  
  114. #if 0
  115. /* Use the code below as a template for the implementation class for this interface. */
  116.  
  117. /* Header file */
  118. class nsXPIDialogService : public nsIXPIDialogService
  119. {
  120. public:
  121.   NS_DECL_ISUPPORTS
  122.   NS_DECL_NSIXPIDIALOGSERVICE
  123.  
  124.   nsXPIDialogService();
  125.  
  126. private:
  127.   ~nsXPIDialogService();
  128.  
  129. protected:
  130.   /* additional members */
  131. };
  132.  
  133. /* Implementation file */
  134. NS_IMPL_ISUPPORTS1(nsXPIDialogService, nsIXPIDialogService)
  135.  
  136. nsXPIDialogService::nsXPIDialogService()
  137. {
  138.   /* member initializers and constructor code */
  139. }
  140.  
  141. nsXPIDialogService::~nsXPIDialogService()
  142. {
  143.   /* destructor code */
  144. }
  145.  
  146. /* boolean confirmInstall (in nsIDOMWindow parent, [array, size_is (count)] in wstring packageList, in unsigned long count); */
  147. NS_IMETHODIMP nsXPIDialogService::ConfirmInstall(nsIDOMWindow *parent, const PRUnichar **packageList, PRUint32 count, PRBool *_retval)
  148. {
  149.     return NS_ERROR_NOT_IMPLEMENTED;
  150. }
  151.  
  152. /* void openProgressDialog ([array, size_is (count)] in wstring packageList, in unsigned long count, in nsIObserver observer); */
  153. NS_IMETHODIMP nsXPIDialogService::OpenProgressDialog(const PRUnichar **packageList, PRUint32 count, nsIObserver *observer)
  154. {
  155.     return NS_ERROR_NOT_IMPLEMENTED;
  156. }
  157.  
  158. /* End of implementation class template. */
  159. #endif
  160.  
  161.  
  162. #endif /* __gen_nsIXPIDialogService_h__ */
  163.